module cal
    implicit none
    real,parameter :: pi = 3.1415926
    interface area
        module procedure area_circle
        module procedure area_rectangle
    end interface
contains
    real function area_circle(r)
        real r
        area_circle = pi*r**2
    end function
    real function area_rectangle(x,y)
        real :: x,y
        area_rectangle = x*y
    end function
end module
program main
    use cal
    implicit none
    real :: r=1.0,a=3.0,b=4.0
    write(*,100)"circle:",area(r)
    write(*,100)"rectangle:",area(a,b)
100 format(a10,f8.2)
end program
